Component({
  options: {
    styleIsolation: "apply-shared",
  },
  properties: {
    total: {
      type: Number,
      value: 0,
    },
  },

  data: {
    orderWays: [
      { type: 1, text: "按歌曲名A-Z排序" },
      { type: 2, text: "按歌手名A-Z排序" },
      { type: 3, text: "按播放量高-低排序" },
      { type: 4, text: "按添加时间排序" },
    ],
    showOrderPopup: false,
    currWay: 1,
  },
  methods: {
    changeOrderWay(e) {
      const { type } = e.currentTarget.dataset;
      this.setData({
        currWay: type,
      });
    },
    openOrderPopup() {
      this.setData({
        showOrderPopup: true,
      });
    },
    onConfirm() {
      console.log("确认选择了排序方式");
    },
  },
});
